package com.zx.mes.rabbitmq.hyl.hello;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * hello 消费者
 * @author hyl
 * @date 2018-3-16
 */
@Component
@RabbitListener(queues = "hello")
public class HelloConsumer {

    private static final Logger logger = LoggerFactory.getLogger(HelloConsumer.class);

    @RabbitHandler
    public void consumer(String message){
        logger.info("receiver:{}",message);
    }
}
